<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>代金卷</h2>
    </div>
    <form action="{:U('FuturesVoucher/updata')}" method="post" class="form-horizontal">
    <input type="hidden" name="id" value="{$list.id}">
        <div class="form-item">
            <label class="item-label">代金卷名称<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large" readonly name="name" value="{$list.name}"><span style = "color:red;">*</span>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">代金卷金额<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" readonly class="text input-large" name="money" value="{$list.money}"><span style = "color:red;">*</span><span>(元)</span>
            </div>
        </div>
         <div class="form-item">
            <label class="item-label">每人领取次数限制<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="person_limit" value="{$list.person_limit}"><span>(注：如果未编辑默认为1次)</span>
            </div>
        </div>
        <div class="sleft">
       		 <label class="item-label">代金卷状态<span class="check-tips"></span></label>
       		 <div class="controls">
             <select name="status" class="text input-large" style = "height:30px; width:400px;">
                 <option value="1"  style="width:200px"<?php if($list['status'] == 1){echo "selected='selected'";}?>>进行中</option>
                 <option value="0"  style="width:200px"<?php if($list['status'] == 0){echo "selected='selected'";}?>>停止</option>
             </select>
             </div>
         </div>
         <div class="form-item">
            <label class="item-label">开始时间<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" id="begin_time" class="text input-large" name="begin_time" value="{$list.begin_time|time_format}"><span>(注：如果未编辑默认为现在)</span>
            </div>
        </div>
         <div class="form-item">
            <label class="item-label">结束时间<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" id="end_time" class="text input-large" name="end_time" value="{$list.end_time|time_format}"><span style = "color:red;">*</span>
            </div>
        </div>
        <div class="form-item">
            <button class="btn submit-btn" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js?v={:SITE_VERSION}" charset="UTF-8"></script>
<script type="text/javascript">
        $('#begin_time,#end_time').datetimepicker({
            format: 'yyyy-mm-dd h:i:s',
            language:"zh-CN",
            minView:2,
            autoclose:true
        });
        //导航高亮
        $('.side-sub-menu').find('a[href="{:U('FuturesVoucher/index')}"]').closest('li').addClass('current');
    </script>
</block>
